<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="add.php">
  <label>question
  <textarea name="q" cols="50"></textarea>
  </label>
  <p>
    <label>
    option 1
    <input type="text" name="o1" />
    </label>
  </p>
  <p>option 2
    <label>
    <input type="text" name="o2" />
    </label>
</p>
<p>option 3
    <label>
    <input type="text" name="o3" />
    </label>
</p>
<p>option 4
    <label>
    <input type="text" name="o4" />
    </label>
</p>
<p>
  <label>
  answer</label>
</p>
<p>
  <input name="r" type="radio" value="a" />
  a<br/>
    <input name="r" type="radio" value="b" />
    b<br />
  <input name="r" type="radio" value="c" />
  c<br />
  <input name="r" type="radio" value="d" />
  d
</p>
<p>
  <label>
  <input type="submit" name="Submit" value="Submit" />
  <input type="reset" name="reset" value="reset" />
  </label>
</p>
</form>
<?php include("sql.php");

$query2= "select max(qno) from ques";
	$result2=mysql_query($query2);
	if (!mysql_query($query2))
  {
  die('Error: ' . mysql_error());
  } 
	$row = mysql_fetch_array($result2);
	$qno=$row[0];
	echo " there are currently $qno questions in database";
?>
</body>

</html>
